/**
 * Created by Mark on 2017/5/11.
 */

/**
 * 内置房间类型
 */
const ROOM_TYPE = {
  BEDROOM: 1,
  ANTECHAMBER: 2,
  FINANCE: 3,
  HEALTHY_LIFE: 4,
  TREATMENT: 5,
  ASSESSMENT: 6,
  DINING: 7,
  ELDER_LIVING: 8,
  PUBLIC_LIVING: 9,
  CONFERENCE: 10,
  PUBLIC_BATHROOM: 11,
  NURSE: 12,
  DOCTOR: 13,
  ACTIVITY: 14,
  PROPERTY_MANAGEMENT: 15,
  LAUNDRY: 16,
  HEALTH_RECOVERY: 17,
  GENERAL_OFFICE: 18,
  BARBER: 19,
  MEDIA: 20,
}

/**
 * 房间朝向
 */
const ORIENTATION = {
  NORTH: 0,
  EAST: 1,
  SOUTH: 2,
  WEST: 3,
}

/**
 * 房间朝向描述
 */
const ORIENTATION_DESC = {
  NORTH: "北",
  EAST: "东",
  SOUTH: "南",
  WEST: "西",
}

/**
 * 床位状态
 */
const BED_STATUS = {
  EMPTY: 0,
  USING: 1,
  RESERVED: 2,
  NOT_AVAILABLE: 3,
}
/**
 * 床位状态颜色
 */
const BED_STATUS_COLOR = {
  EMPTY: "#15c098",
  USING: "#3195de",
  RESERVED: "#f39b14",
  NOT_AVAILABLE: "#e86c60",
}

const colorOfStatus = function(status) {
  let result;
  switch(status) {
    case BED_STATUS.EMPTY:
      result = BED_STATUS_COLOR.EMPTY;
      break;
    case BED_STATUS.USING:
      result = BED_STATUS_COLOR.USING;
      break;
    case BED_STATUS.RESERVED:
      result = BED_STATUS_COLOR.RESERVED;
      break;
    case BED_STATUS.NOT_AVAILABLE:
      result = BED_STATUS_COLOR.NOT_AVAILABLE;
      break;
    default:
      result = BED_STATUS_COLOR.EMPTY;
      break;
  }
  return result;
}

export {ROOM_TYPE, ORIENTATION, ORIENTATION_DESC, BED_STATUS, BED_STATUS_COLOR, colorOfStatus}
